<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>back-prepare</title>
    <link rel="stylesheet" href="/admin/layui-v2.4.5/layui/css/layui.css"  media="all">
    <link rel="stylesheet" href="/admin/css/admin.css"  media="all">
</head>
<body>

<script src="/admin/layui-v2.4.5/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="/admin/js/jquery.js"></script>

<div class="layui-tab">
    <ul class="layui-nav layui-bg-green  ">
    <li class="layui-nav-item "><a href="../../static/html/back-staff.html">人员管理</a></li>
    <li class="layui-nav-item "><a href="../../static/html/back-duty.html">值班表</a></li>
    <li class="layui-nav-item">
        <a href="javascript:;">生成报表</a>
        <dl class="layui-nav-child">
            <!--<dd><a href="../../static/html/back-med.html ">药房</a></dd>-->
            <dd><a href="../../static/html/back-form.html">门诊</a></dd>
           <!--<dd class="layui-this"><a href="">选中项</a></dd>-->

        </dl>
    </li>
    <!--<li class="layui-nav-item"><a href=" ">备用</a></li>-->
</ul>
</div>

<table class="layui-hide" id="demo" lay-filter="demo"></table>

<script>

    layui.use([  'table','form','layer'], function() {
        var $ = layui.jquery
            , table = layui.table //表格
            , form = layui.form //表单
            , layer = layui.layer //弹层
            , index = parent.layer.getFrameIndex(window.name)

        //执行一个 table 实例
        table.render({
            elem: '#demo'
            , height: 420
            , url: '/hospital/user' //数据接口
            , id: '#testReload'
            , title: '用户表'
            , limit: 10
            , method: 'post'
            , page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） - 详见文档
                layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']
                , limits: [10, 20]
                , jump: function (obj) {
                    console.log(obj)
                }
            }
           // , toolbar: 'default' //开启工具栏，此处显示默认图标，可以自定义模板，详见文档
            // ,totalRow: true //开启合计行
            , cols: [[ //表头
                //{type: 'checkbox', fixed: 'left'}
                 {field: 'ad_num', title: '管理员账号', sort: true}
                , {field: 'ad_remark', title: '管理员备注'}
                , {field: 'ad_power', title: '管理员权限 ', sort: true}
                , {field: 'ad_name', title: '管理员姓名 '}
                // ,{fixed: 'right', width: 165, align:'center', toolbar: '#barDemo'}
            ]]
        });


        layui.use('element', function () {
            var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

            //监听导航点击
            element.on('nav(demo)', function (elem) {
                //console.log(elem)
                layer.msg(elem.text());
            });
        });



    })



</script>

</body>
</html>